﻿namespace my_console;

public class HISRISOrderDTO
{
  #region   patient information
  /// <summary>
  /// HIS 病人编号 （唯一,如有值将用作RIS中的GlobalPatientId）
  /// </summary>
  public string GloablePatientid { get; set; }
  /// <summary>
  /// 病人名称
  /// </summary>
  //public string PatientName { get; set; }
  /// <summary>
  /// pingying
  /// </summary>
  public string NameInPy { get; set; }
  /// <summary>
  /// 生日
  /// </summary>
  public string Birthday { get; set; }
  /// <summary>
  /// 性别
  /// </summary>
  public string Gender { get; set; }
  /// <summary>
  /// 地址
  /// </summary>
  public string Address { get; set; }
  /// <summary>
  /// 电话
  /// </summary>
  public string Telephone { get; set; }
  /// <summary>
  /// 身份证号
  /// </summary>
  public string IdCard { get; set; }

  public string SocietyNumber { get; set; }

  /// <summary>
  /// 民族代码
  /// </summary>
  public string NationCode { get; set; }
  /// <summary>
  /// 民族名称
  /// </summary>
  public string NationName { get; set; }

  public string FamilyName { get; set; }
  public string GivenName { get; set; }
  public string MiddleName { get; set; }

  /// <summary>
  /// 患者信息版本
  /// </summary>
  public long PatientVersion { get; set; }

  /// <summary>
  /// His患者数据来源（编码）
  /// </summary>
  public string PidSourceCode { get; set; }
  #endregion

  #region  visit information

  /// <summary>
  /// HIS 患者编号（可能不唯一）
  /// </summary>
  public string HisPatientId { get; set; }

  /// <summary>
  /// 就诊号
  /// </summary>
  public string VisitNumber { get; set; }

  /// <summary>
  /// 住院号
  /// </summary>
  public string InhospitalNumber { get; set; }
  /// <summary>
  /// 门诊号
  /// </summary>
  public string ClinicNumber { get; set; }

  /// <summary>
  /// 病人类型。急诊还是门诊，住院
  /// </summary>
  public string PatientType { get; set; }

  /// <summary>
  /// 病房号
  /// </summary>
  public string RoomNo { get; set; }

  /// <summary>
  /// 床位号
  /// </summary>
  public string BedNo { get; set; }

  /// <summary>
  /// 过敏史
  /// </summary>
  public string AllergyHistory { get; set; }

  /// <summary>
  /// 患者身份
  /// </summary>
  public string PatientIdentity { get; set; }

  /// <summary>
  /// 费别
  /// </summary>
  public string ChargeType { get; set; }
  /// <summary>
  /// 费别Code
  /// </summary>
  public string ChargeTypeCode { get; set; }

  /// <summary>
  /// 传染病检查(ES)
  /// </summary>
  public string InfectionResult { get; set; }

  /// <summary>
  /// HP检查(ES)
  /// </summary>
  public string HpTestResult { get; set; }
  /// <summary>
  /// 其他诊断
  /// </summary>
  public string OtherDiagnosis { get; set; }

  /// <summary>
  /// 体征
  /// </summary>
  public string Sign { get; set; }

  /// <summary>
  /// 化验结果
  /// </summary>
  public string LaboratoryReport { get; set; }

  /// <summary>
  /// 症状
  /// </summary>
  public string Symptom { get; set; }

  /// <summary>
  /// 危重值名称
  /// </summary>
  public string CriticalName { get; set; }

  /// <summary>
  /// 危重值编码
  /// </summary>
  public string CriticalCode { get; set; }

  /// <summary>
  /// 医嘱类型
  /// </summary>
  public string DoctorAdviceTypeCode { get; set; }

  /// <summary>
  /// 既往史
  /// </summary>
  public string PastHistory { get; set; }

  /// <summary>
  /// 病案号
  /// </summary>
  public string MedicalRecordNumber { get; set; }

  /// <summary>
  /// 就诊流水号
  /// </summary>
  public string VisitSerialNumber { get; set; }
  #endregion

  #region order information

  /// <summary>
  /// RIS申请单号
  /// </summary>
  public string OrderId { get; set; }

  /// <summary>
  /// RIS检查号
  /// </summary>
  //public string AccessionNumber { get; set; }

  /// <summary>
  /// HIS 申请单号
  /// </summary>
  //public string HisOrderCode { get; set; }

  /// <summary>
  /// HIS 检查项目
  /// </summary>
  public string HisExamName { get; set; }

  /// <summary>
  /// 申请科室code
  /// </summary>
  public string OrderDeaprtmentCode { get; set; }

  /// <summary>
  /// 申请科室名称
  /// </summary>
  public string OrderDeaprtmentName { get; set; }

  /// <summary>
  /// 申请医生ID
  /// </summary>
  public string ApplyDoctorId { get; set; }

  /// <summary>
  /// 申请医生code
  /// </summary>
  public string ApplyDoctorCode { get; set; }

  /// <summary>
  /// 申请医生名称
  /// </summary>
  public string ApplyDoctorName { get; set; }

  /// <summary>
  /// 检查科室code
  /// </summary>
  public string ExamDeaprtmentCode { get; set; }
  /// <summary>
  /// 检查科室名称
  /// </summary>
  public string ExamDeaprtmentName { get; set; }


  /// <summary>
  /// 检查医生code
  /// </summary>
  public string ExamDoctorCode { get; set; }

  /// <summary>
  /// 检查医生名称
  /// </summary>
  public string ExamDoctorName { get; set; }

  /// <summary>
  /// 检查项目code集合，中间用|分隔开
  /// </summary>
  public string OrderExamCode { get; set; }

  /// <summary>
  /// 检查项目名称集合，中间用|分隔开。并且和code的顺序一致
  /// </summary>
  public string OrderExamname { get; set; }

  /// <summary>
  /// 检查项目费用，中间用|分隔开，并且和code的顺序一致
  /// </summary>
  public string ExamCosts { get; set; }

  /// <summary>
  /// 临床诊断
  /// </summary>
  public string ClinicalDiagnosis { get; set; }

  /// <summary>
  /// 总费用
  /// </summary>
  public string TotalCosts { get; set; }

  /// <summary>
  /// 预约时间
  /// </summary>
  public string OrderDateTime { get; set; }

  /// <summary>
  /// 预约结束时间
  /// </summary>
  public string OrderDateTimeEnd { get; set; }

  /// <summary>
  /// 检查时间
  /// </summary>
  public string StudyDateTime { get; set; }

  /// <summary>
  /// Study Instance UID
  /// </summary>
  public string StudyId { get; set; }

  /// <summary>
  /// 病理史
  /// </summary>
  public string DiseaseHistory { get; set; }

  /// <summary>
  /// 申请单旧的状态，厦门智业"状态改变接口"使用，预留字段，默认值为空，没有实际数据
  /// </summary>
  public string OrderOldStatus { get; set; }

  /// <summary>
  /// 申请单状态。HIS申请单读取过来时为申请状态，预约后才变成预约状态
  /// </summary>
  //public string OrderStatus { get; set; }

  /// <summary>
  /// HIS申请单状态。从HIS获取的HIS检查申请单的状态，和RIS的申请单状态无关
  /// </summary>
  public string HisOrderStatus { get; set; }

  /// <summary>
  /// 是否关联影像 true :关联 false:未关联
  /// </summary>
  public string IsMatch { get; set; }

  /// <summary>
  /// 备注
  /// </summary>
  public string Note { get; set; }

  /// <summary>
  /// his辅助说明
  /// </summary>
  public string HISNote { get; set; }

  /// <summary>
  /// his部位名称
  /// </summary>
  public string HISBodyPartName { get; set; }

  /// <summary>
  /// 设备类型code
  /// </summary>
  public string ModalityCode { get; set; }

  public string ModalityName { get; set; }

  public string DeviceCode { get; set; }

  public string DeviceName { get; set; }
  public string ExamRoom { get; set; }
  /// <summary>
  /// 检查室ID
  /// </summary>
  public string DeviceId { get; set; }

  public string DeviceAETitle { get; set; }

  /// <summary>
  /// 预约者code
  /// </summary>
  public string OrderDoctorCode { get; set; }

  /// <summary>
  /// 预约者name
  /// </summary>
  public string OrderDoctorName { get; set; }

  /// <summary>
  /// 申请单最后操作者code(新建到检申请单时=到检登记者;之后即为修改者)
  /// </summary>
  public string LastModifierCode { get; set; }

  /// <summary>
  /// 申请单最后操作者name
  /// </summary>
  public string LastModifierName { get; set; }

  private string _lastModifierCodeAndName = "";
  /// <summary>
  /// 申请单最后操作者code和name连接串:code/name
  /// </summary>
  public string LastModifierCodeAndName
  {
    get { return (LastModifierCode + "/" + LastModifierName); }
    set { _lastModifierCodeAndName = value; }
  }

  /// <summary>
  /// 申请单最后操作时间
  /// </summary>
  public string LastModifierTime { get; set; }

  public string SpecifiedApplyDoctorName { get; set; }

  /// <summary>
  /// 开单日期
  /// </summary>
  public string HisOrderRequestDate { get; set; }

  /// <summary>
  /// 年龄
  /// </summary>
  public string Age { get; set; }

  /// <summary>
  /// 年龄单位
  /// </summary>
  public string AgeUnit { get; set; }

  /// <summary>
  /// 年龄单位编码
  /// </summary>
  public string AgeUnitCode { get; set; }

  /// <summary>
  /// 附加信息，用于第三方附加信息传输
  /// </summary>
  public string AdditionalInfo { get; set; }

  /// <summary>
  /// 医院编码，对应Hospital表的Code字段
  /// </summary>
  //public string HospitalCode { get; set; }

  /// <summary>
  /// 集成数据源编码
  /// </summary>
  public string IntegrationSourceCode { get; set; }
  public string HisOrderRequestSatrtDate { get; set; }
  public string HisOrderRequestEndDate { get; set; }
  public string InHospitalCount { get; set; }

  /// <summary>
  /// 子系统支持的设备类型
  /// </summary>
  public string SupportedModalityCodes { get; set; }

  /// <summary>
  /// 病区号
  /// </summary>
  public string RoomNumber { get; set; }


  #endregion

  /// <summary>
  /// 电子健康码
  /// </summary>
  public string ElectronicHealthCard { get; set; }

  /// <summary>
  /// 紧急程度（HIS => 0:普通,1:加急,2:紧急）
  /// </summary>
  public string EmergencyDegree { get; set; }
  /// <summary>
  /// 紧急程度名称（HIS => 0:普通,1:加急,2:紧急）
  /// </summary>
  public string EmergencyDegreeName { get; set; }

  /// <summary>
  /// 是否是刚创建的申请单。1表示是刚创建的，0表示是已修改的申请单
  /// </summary>
  public int IsNewCreate { get; set; }

  public int? QueueNumber { get; set; }

  /// <summary>
  /// 预约工具 1:陪同，2:轮椅,3:平车, 4:推床，5：其他
  /// </summary>
  public string VehicleId { get; set; }

  /// <summary>
  /// 陪同人员 1.辅医人员，2.医生，3.护士，4.实习生，5.其他
  /// </summary>
  public string EntourageId { get; set; }

  /// <summary>
  /// 预住院标识
  /// </summary>
  public string PreIHFlag { get; set; }

  /// <summary>
  /// 预住院诊断
  /// </summary>
  public string PreDiagnose { get; set; }

  /// <summary>
  /// 卒中绿道
  /// </summary>
  public string Apoplexy { get; set; }

  /// <summary>
  /// 日间手术
  /// </summary>
  public string DaySurgery { get; set; }


  public string HisOrderCode { get; set; }

  public string AccessionNumber { get; set; }

  public string PatientName { get; set; }

  public string HospitalCode { get; set; }

  public string OrderStatus { get; set; }
}

/// <summary>
/// HIS检查项目
/// </summary>
public class HISProcedure
{
  /// <summary>
  /// 检查项目编码
  /// </summary>
  public string Code { get; set; }
  /// <summary>
  /// 检查项目名称
  /// </summary>
  public string Name { get; set; }
  /// <summary>
  /// 部位
  /// </summary>
  public string Bodypart { get; set; }
  /// <summary>
  /// 费用
  /// </summary>
  public string Cost { get; set; }
  /// <summary>
  /// 检查科室编码
  /// </summary>
  public string ExamDeptCode { get; set; }
  /// <summary>
  /// 检查科室名称
  /// </summary>
  public string ExamDeptName { get; set; }
}